Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
web-animation-club
Advanced tools
Tiny ~0.8kb
javascript library with cross-browser methods to handle CSS ontransitionend
and onanimationend
events. AKA css animation and transition callbacks.
Quick usage example of the onceTransitionEnd
wac method.
wac.onceTransitionEnd(element).then(function(event) {
// ... do something
});
Access the demo at https://web-animation.caferati.me
From the NPM registry
using npm or yarn just install the web-animation-club
package.
npm install --save web-animation-club
or
yarn add --save web-animation-club
For all the following examples please consider the following HTML markup.
<style>
.animated {
transition: transform 0.4s linear;
}
.move {
transform: translateX(100px);
}
</style>
<div class="container">
<div class="box"></div>
</div>
<script src="/path/to/web-animation-club.min.js"></script>
<script>
var box = document.querySelector('.box');
box.classList.add('animated');
box.classList.add('move');
onceTransitionEnd(box).then(function(event) {
// ... do something
});
</script>
import { onceTransitionEnd } from 'web-animation-club';
const element = document.querySelector('.box');
// here we're just simulating the addition of a class with some animation/transition
element.classList.add('animated');
element.classList.add('move');
// if you are using the transition css property
onceTransitionEnd(element).then((event) => {
// ... do something
});
element
<[HTML element]> html element on which the transition is happeningoptions
<[object]>
tolerance
<[integer]> used in case of pseudo-element animationsproperty
<[string]> animated property to check before calling the callbackelement
<[HTML element]> html element on which the transition is happeningoptions
<[object]>
tolerance
<[integer]> used in case of pseudo-element animationsproperty
<[string]> animated property to check before calling the callbackframes
<[integer]> Number of frames to skipcallback
<[function]> function called after the skipped framescallback
<[function]> function called after the skipped frameMIT. Copyright (c) 2018 Rafael Caferati.
FAQs
Web Animation Club
The npm package web-animation-club receives a total of 7,136 weekly downloads. As such, web-animation-club popularity was classified as popular.
We found that web-animation-club demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.